<!DOCTYPE html>
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
		<title>Cup Repository</title>
		<link href="football.css" rel="stylesheet" type="text/css" />
		<script src="lib/touch/sencha-touch.js" type="text/javascript"></script>
		<link href="lib/touch/resources/css/sencha-touch.css" rel="stylesheet" type="text/css" />
		<script type="text/javascript" src="js/util/parserUtil.js" charset='utf-8'></script>
		<script type="text/javascript" src="js/util/NetworkUtil.js" charset='utf-8'></script>
		
		<script type="text/javascript" src="js/model/CupSchedule.js" charset='utf-8'></script>
		<script type="text/javascript" src="js/model/CupScheduleManager.js" charset='utf-8'></script>
		<script type="text/javascript" src="js/view/CupGroupPointsView.js" charset='utf-8'></script>
		<script type="text/javascript" src="js/view/CupGroupResultView.js" charset='utf-8'></script>
		<script type="text/javascript" src="js/view/CupScheduleResultView.js" charset='utf-8'></script>
		
		<script type="text/javascript" src="js/CupRepositoryVariable.js" charset='utf-8'></script>
		<script type="text/javascript" src="js/cupRepository.js" charset='utf-8'></script>
		<script type="text/javascript" src="js/action.js" charset='utf-8'></script>
		<script type="text/javascript" src="js/test.js" charset='utf-8'></script>
	</head>
	
	<body>
	
		<textarea id="noScheduleResult-template" class="x-hidden-display">
            <div class="noYapeidata"><span>暂无相关数据</span></div>
        </textarea>
        
        <textarea id="noCupFenzuPoints-template" class="x-hidden-display">
            <div class="noYapeidata"><span>暂无相关数据</span></div>
        </textarea>
        
        <textarea id="noCupGroupResult-template" class="x-hidden-display">
            <div class="noYapeidata"><span>暂无相关数据</span></div>
        </textarea>
        	
<!-- fenzu points -->		
		<textarea id="cupFenzuPoints-template" class="x-hidden-display">
			<div id="data">
			<tpl for="CupFenzuPointsArray">			
				<div id ="groupPointsTitle{#}" class="fx_title2" onclick="fenzuAction({#})">{CupGroupName}</div>
					<div id ="table_cupGroupPoints{#}" style="display:block;">
						<table width="100%" border="0" cellpadding="0" cellspacing="0" >
							<tbody>
							<tr class="data_title">
                   				<td width="31">排名</td>
							    <td width="96">球队</td>
							    <td width="22">赛</td>
							    <td width="22">赢</td>
							    <td width="22">平</td>
							    <td width="25">负</td>
							    <td width="22">得</td>
							    <td width="22">失</td>
							    <td width="22">净</td>
							    <td width="36">积分</td>
               				</tr>
							<tpl for="CupPointsArray">
								<tpl if="this.isOutlet(color)">
									<tr class="">
								</tpl>
								<tpl if="!this.isOutlet(color)">
									<tr class="date_td1">
								</tpl>
								<td>{rank}</td>
								<td>{[this.getShortName(values.simplifiedTeamName)]}</td>
								<td>{matches}</td>
								<td>{win}</td>
								<td>{draw}</td>
								<td>{lose}</td>
								<td>{score}</td>
								<td>{scoreAgainst}</td>
								<td>{scoreEarn}</td>
								<td>{points}</td>
								</tr>
							</tpl>
							</tbody>
						</table>
					</div>
				</tpl>
			</div>
		</textarea>
<!-- fenzu schedule result -->	
		<textarea  id="cupGroupResult-template" class="x-hidden-display">		
			<div id="data">
			<tpl for="CupFenzuResultArray">
			<div id ="groupResultTitle{#}" class="fx_title2" onclick="resultAction({#})">{[this.getFenzuName(values)]}</div>	
			<div id ="table_result{#}" style="display:block;">
			<table width="320" border="0" cellpadding="0" cellspacing="0">
		    <tr class="bx_title">
		      <td width="80">时间</td>
		      <td width="90">主队</td>
		      <td width="60">比分</td>
		      <td width="90">客队</td>
		    </tr>
		    
		    <tpl for=".">
			  <tpl if="xindex % 2 === 0">
							<tr class="date_td1">
						</tpl>
						<tpl if="xindex % 2 !== 0">
							<tr class="date_td2">
			  </tpl>
		      <td><span class="data_time2">{[this.scheduleDateString(values.matchTime)]}</span></td>
		      <td>{[this.getShortName(values.simplifiedHomeName)]}</td>
		      
		      <tpl if="this.isFinished(state)">
	      		<td><span style="color:#FF0000">{homeScore}:{awayScore}</span>({homeHalfScore}:{awayHalfScore})</td>
			  </tpl>
						
			  <tpl if="!this.isFinished(state)">
	      		<td>未</td> 
			  </tpl>
			  		    
		      <td>{[this.getShortName(values.simplifiedAwayName)]}</td>
		    </tr>
		    </tpl>
		  </table>
		  </div>
		  </tpl>
		  </div>
	   </textarea>			
<!-- other schedule result -->
		<textarea id="cupScheduleResult-template" class="x-hidden-display">		
			<div id="data">
			<table width="320" border="0" cellpadding="0" cellspacing="0">
		    <tr class="bx_title">
		      <td width="80">时间</td>
		      <td width="90">主队</td>
		      <td width="60">比分</td>
		      <td width="90">客队</td>
		    </tr>		    
		    <tpl for="matchResultArray">
			  <tpl if="xindex % 2 === 0">
							<tr class="date_td1">
						</tpl>
						<tpl if="xindex % 2 !== 0">
							<tr class="date_td2">
			  </tpl>
		      <td><span class="data_time2">{[this.scheduleDateString(values.matchTime)]}</span></td>
		      <td>{[this.getShortName(values.simplifiedHomeName)]}</td>
		      
		      <tpl if="this.isFinished(state)">
	      		<td><span style="color:#FF0000">{homeScore}:{awayScore}</span>({homeHalfScore}:{awayHalfScore})</td>
			  </tpl>
				
			 <tpl if="!this.isFinished(state)">					  
			  <tpl if="this.statusHilight(state)">		           
                     <font color="#FF0000">
                          <td>{[getStatusString(values.state)]}</td> 
                     </font>
               </tpl>
               <tpl if="!this.statusHilight(state)">	
                          <td>{[getStatusString(values.state)]}</td> 
               </tpl>
			  </tpl>		    
		      <td>{[this.getShortName(values.simplifiedAwayName)]}</td>
		    </tr>
		    </tpl>
		  </table>
		  </div>
		</textarea>
	</body>
</html>